package com.lzb.watermarkcamera;

import android.icu.util.Calendar;

import java.text.SimpleDateFormat;
import java.util.Locale;

public class AppConfig {

    public static String DATE = getCurrentDate();
    public static String TIME = getCurrentTime();
    //意见反馈
    public static String FEEDBACK_DATA = "https://api.tgelia.com/api/bus/addFeedback";

    public static int WIDTH = 1080;
    public static int HEIGHT = 1920;
    public static float TOP = 0;
    public static float LEFT = 0;
    public static float VIDEO_HEIGHT = 0;
    public static float VIDEO_WIDTH = 0;
    public static float BARHEIGHT = 0;

    public static String getCurrentDate() {
        // 获取当前日期实例
        Calendar calendar = null;
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
            calendar = Calendar.getInstance();
            // 定义日期格式（"MM" 和 "dd" 自动补零）
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault());
            // 格式化日期
            return sdf.format(calendar.getTime());
        }
        return "";
    }

    public static String getCurrentTime() {
        // 获取当前时间实例
        Calendar calendar = null;
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
            calendar = Calendar.getInstance();
            // 定义时间格式（HH=24小时制，mm=分钟）
            SimpleDateFormat sdf = new SimpleDateFormat("HH:mm", Locale.getDefault());
            return sdf.format(calendar.getTime());
        }
        return "";

    }
}
